<template>
	<view style="height: 100%;">
		<calendar :min="min" @selectorDate="selectorDate" />
	</view>
</template>

<script lang="ts" setup>
	import calendar from '@/components/hl-calendar-range.vue'
	import { useStore } from 'vuex'
	import { onLoad } from '@dcloudio/uni-app'
	import { ref } from 'vue'
	const sotre = useStore()
	const min = ref(1)
	const selectorDate = (e : any) => {
		sotre.commit('CalendarData', e)
		uni.navigateBack()
	}
	onLoad((op) => {
		if(op.min) {
			min.value = Number(op.min || 1)
		}
	})
</script>

<style>
	page {
		height: 100%;
	}
</style>